speedradar 2.2.0
Loading...
Searching...
No Matches
speedradar


Speed Radar Click

Speed Radar Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.


Click Library

  • Author : Nenad Filipovic
  • Date : Jul 2023.
  • Type : UART type

Software Support

Example Description

This example demonstrates the use of Speed Radar Click board by processing the incoming data and displaying them on the USB UART.

Example Libraries

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.SpeedRadar

Example Key Functions

Application Init

Initializes the driver and performs the Click default configuration.

void application_init ( void )
{
log_cfg_t log_cfg;
speedradar_cfg_t speedradar_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
speedradar_cfg_setup( &speedradar_cfg );
SPEEDRADAR_MAP_MIKROBUS( speedradar_cfg, MIKROBUS_1 );
if ( UART_ERROR == speedradar_init( &speedradar, &speedradar_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( SPEEDRADAR_ERROR == speedradar_default_cfg ( &speedradar ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
speedradar_process( &speedradar );
speedradar_clear_app_buf( );
Delay_ms ( 100 );
log_info( &logger, " Application Task " );
log_printf( &logger, " ---------------------- \r\n" );
Delay_ms ( 100 );
}
#define SPEEDRADAR_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition speedradar.h:288
void application_init(void)
Definition main.c:75
@ SPEEDRADAR_ERROR
Definition speedradar.h:346

Application Task

The demo application sends a command that returns and displays the speed [km/h] and magnitude [dB] of the dominant movement for the forward and backward planes of the spectrum, measured frontal to the sensor. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void )
{
Delay_ms ( 50 );
speedradar_process( &speedradar );
if ( app_buf_len >= PROCESS_C00_RSP_LEN )
{
speedradar_adv_det_display( );
speedradar_clear_app_buf( );
Delay_ms ( 100 );
}
}
#define SPEEDRADAR_CMD_GET_DETECTION_STR
Speed Radar class C variable length complex read parameters.
Definition speedradar.h:183
#define PROCESS_C00_RSP_LEN
Definition main.c:35
void application_task(void)
Definition main.c:118

Application Output

This Click board can be interfaced and monitored in two ways:

  • Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
  • UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.

Additional Notes and Information

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.